import { createApp } from 'vue'
import App from './App.vue'
import Antd from 'ant-design-vue';

import {Input,} from 'ant-design-vue';

import 'ant-design-vue/dist/antd.css';
import { createRouter, createWebHashHistory } from 'vue-router';

import {init,web3} from "./web3.js"

const modules = import.meta.glob('./pages/*.vue');
console.log(modules)
const routes = [];
Object.keys(modules).forEach((key, index) => {
    console.log(key)
    routes.push({　path: key.replace("./pages","").replace(".vue",""),　component: modules[key],　}); 
});
console.log(routes)
const router = createRouter({ history:createWebHashHistory(), routes, })
 
const app = createApp(App);
app.use(router);
var antdArr = [Input]
antdArr.map(e=>app.use(e))
// app.use(Antd);
app.config.globalProperties.init = init 
app.config.globalProperties.web3 = web3
app.mount('#app');